//
//  MBProgressHUD+Extension.m
//  zjsapp
//
//  Created by 技术部mac1 on 2018/1/4.
//  Copyright © 2018年 njmd. All rights reserved.
//

#import "MBProgressHUD+Extension.h"


@implementation MBProgressHUD (Extension)

+ (void)showTextHUD:(NSString *)text{
    [MBProgressHUD showTextHUD:text superView:[UIApplication sharedApplication].keyWindow];
}

+ (void)showTextHUD:(NSString *)text superView:(UIView *)view {
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
    hud.mode = MBProgressHUDModeText;
    [hud.label setText:text];
    hud.label.font = [UIFont systemFontOfSize:relativeWidth(14)];
    [hud.label setTextColor:[UIColor whiteColor]];
    hud.margin = 15.f;
    hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
    hud.bezelView.color = [[UIColor blackColor] colorWithAlphaComponent:0.5];
    hud.removeFromSuperViewOnHide = YES;
    [hud hideAnimated:YES afterDelay:1.5f];
}




@end
